﻿namespace Busconeitor.Web.Controllers
{
    using System.Web.Mvc;
    using BusinessLayer;
    using Utils;

    public class AdminController : Controller
    {
        public ActionResult Index()
        {
            ViewBag.Message = "Busconeitor";

            return View();
        }

        [HttpPost]
        public ActionResult GenerateIndex()
        {
            var rule = new ParserRules();
            var result = rule.GenerateIndex(Params.DocumentPath);            
            ViewBag.IndexResult = result;

            return View();
        }
    }
}